//引入样式
require('../../assets/css/normalize.css')
require('../../assets/css/reset.css')
require('../../assets/fonts/iconfont.css');
require('../../assets/css/tabbar.less');
require('./mine.less');

//引入模块
const dom = require('../../utils/dom.js');
const axios = require('../../utils/axios.js');

document.addEventListener('DOMContentLoaded', function () {
    //渲染tabbar
    dom.tabbar('mine');

    //显示个人信息
    axios.get('/api/user/info').then(res => {
        let data = res.data.data;
        console.log(data);
        dom.get('#avator').src = axios.defaults.baseURL + data.imgUrl;
        dom.get('.username').textContent = data.nickName;
        dom.get('#sign').textContent = data.sign;
    })
});
